//
//  SPVenueViewController.m
//  Sport
//
//  Created by Cass on 2017/11/24.
//  Copyright © 2017年 Cass. All rights reserved.
//

#import "SPVenueViewController.h"
#import "SPSeekViewController.h"
#import "SPVenueInfoCell.h"
@interface SPVenueViewController ()<UITableViewDelegate,UITableViewDataSource>
@property (weak, nonatomic) IBOutlet UITableView *tableView;
@property (weak, nonatomic) IBOutlet UIButton *district;
@property (weak, nonatomic) IBOutlet UIButton *type;
@property (weak, nonatomic) IBOutlet UIButton *order;


@end

@implementation SPVenueViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"场馆";
    self.navigationItem.rightBarButtonItem = [UIBarButtonItem itemWithImage:nil selectedImage:nil title:@"搜索" target:self action:@selector(seek:)];
}

- (void)seek:(UIBarButtonItem *)barButtonItem{
    SPSeekViewController *seekVC = [[UIStoryboard storyboardWithName:@"Venue" bundle:[NSBundle mainBundle]] instantiateViewControllerWithIdentifier: NSStringFromClass([SPSeekViewController class])];
    [self.navigationController pushViewController:seekVC animated:YES];
}

- (IBAction)districtClick:(id)sender {

}

- (IBAction)typeClick:(id)sender {

}
- (IBAction)orderClick:(id)sender {

}

#pragma mark - UITableViewDataSource&&UITableViewDelegate -
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 20;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    SPVenueInfoCell *cell = [SPVenueInfoCell cellWithTableView:tableView];
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    return cell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
    return 14.0f;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 80.0f;
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    
}


@end
